package com.mnsq.common.bean.entity.book;

import com.mnsq.common.bean.entity.CommonEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * @author Administrator
 * @date 2019/1/21 0021
 */
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "x_book_type", uniqueConstraints = {@UniqueConstraint(name = "book_type", columnNames = {"book_id", "type_id"})})
public class BookType extends CommonEntity {
    private static final long serialVersionUID = 7882804829298059792L;
    /**
     * 书籍ID
     */
    @Column(name = "book_id")
    private Long bookId;
    /**
     * 分类ID
     */
    @Column(name = "cate_id")
    private Long cateId;
    /**
     * 类型ID
     */
    @Column(name = "type_id")
    private Long typeId;
}
